package com.threegroup.common.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.threegroup.common.entity.OrderDetailEntity;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

import java.math.BigDecimal;
import java.util.List;

/**
 * 订单表
 *
 * @author kohlerm kohlerm@163.com
 * @since 1.0.0 2022-12-16
 */
@Data
public class OrdersDTO implements Serializable {
    private static final long serialVersionUID = 1L;

	private Long id;

	private String number;

	private Integer status;

	private Long userId;

	private Long addressBookId;
	//GMT+8表示时区，东八区，需加上时区，shape 默认是JsonFormat.Shape.ANY,
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date orderTime;
	//GMT+8表示时区，东八区，需加上时区，shape 默认是JsonFormat.Shape.ANY,
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date checkoutTime;

	private Integer payMethod;

	private BigDecimal amount;

	private String remark;

	private String phone;

	private String address;

	private String userName;

	private String consignee;

	private List<OrderDetailDTO> orderDetails;

}